//
// Created by hsj on 2022/1/12.
//

#include <iostream>
#include "t_namespace.h"

//名称空间
void test_namespace(){
    using std::cout;
    using std::endl;

    using debts::debt;
    using debts::set_debt;
    using debts::show_debt;
    using debts::sum_debts;

    debt db001;
    debt db002;

    set_debt(db001);
    show_debt(db001);

    set_debt(db002);
    show_debt(db002);

    debt ar[2]{
            {
                    { "first",
                    "last first"
                    },
                    18
            },
            {
                    { "second",
                      "last second"
                    },
                    28
            }
    };
    cout<<"sum_debts:"<<sum_debts(ar,2)<<endl;
}